feat: support SP-to-SP fetch via host.docker.internal resolution #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft to start with because I'm still testing with this but it does work as is for now.
I'm testing FilOzone/synapse-sdk#544 & filecoin-project/curio#864, which will end up being default behaviour so we need to account for it here. The challenge I'm solving for here is that I need the Curio nodes to be able to talk to each other, for the host to talk to the Curio nodes, and the SP registry to provide a
serviceUrlthat works inside the containers and outside. Unfortunately I don't think there's a clean Docker way to achieve this that works across Linux and macOS so instead I'm going with the default Docker internal host naming ofhost.docker.internaland requiring that the host also know that name for its own localhost. This is a solution I've found various people using online to achieve something like this.foc-devnet will now check that you have that set up before proceeding and tell you how to fix it if it's needed.
Note also we're doing a default of 2 Curio nodes here to simulate the durability requirements that we need to achieve, so this will also be standard going forward.